Prepare the filling: Heat the olive oil or butter in a skillet over medium heat. Add the chopped onion and garlic, and cook until softened, about 3 minutes. Add the ground meat, breaking it up as it cooks, and cook until browned. If using, add the grated carrot and cook until tender.
Season the mixture: Stir in the tomato paste, oregano or thyme, paprika, salt, and pepper. Cook for another 2-3 minutes, allowing the flavors to meld together. Remove from heat and let the mixture cool slightly.
Assemble the pastries: Preheat the oven to 375°F (190°C). Roll out the puff pastry sheets on a floured surface. Cut them into squares or rectangles. Place a spoonful of the meat filling in the center of each pastry.
Seal and brush: Fold the pastry over the filling to form a pocket or triangle, and press the edges to seal. Brush the top with the beaten egg yolk, and sprinkle sesame or poppy seeds on top, if desired.
Bake: Place the pastries on a baking sheet lined with parchment paper and bake for 20-25 minutes, or until golden and crisp.
Serve: Allow the pastries to cool slightly before serving. Enjoy them hot, straight from the oven!