Put oven rack in middle position and preheat oven to 400°F. Roll out pastry on a lightly floured surface with a lightly floured rolling pin into a 12-inch square, then transfer to a large baking sheet. Blend cottage cheese, sour cream, salt, and pepper in a blender until smooth. Cook bacon in a 10-inch skillet over moderate heat, stirring occasionally, until it just begins to brown, about 5 minutes. (Bacon should be tender, not crisp.) Remove from heat. Spread cheese mixture evenly over pastry, leaving a 1-inch border all around. Scatter bacon and onion on top, then sprinkle with parmesan. Bake until pastry is golden brown, 20 to 25 minutes. Cut into 36 pieces and serve warm.