Preheat the oven to 375ยบ F.
Line a baking sheet with parchment paper and set aside.
In a medium-size mixing bowl combine ham, cheeses, black pepper, Worcestershire, hot sauce, shallots and mayonnaise. Mix well.
Brush 24 of the pastry squares with the beaten egg wash, then put a heaping teaspoon of the ham and cheese mixture in the center of each square.
Top with the remaining 24 pastry squares and using your fingers, gently seal the edges together.
Put the squares on the prepared baking sheet and brush the tops with egg wash.
Bake until lightly golden brown, about 15 minutes.
Serve warm