In a mixing bowl, combine the flour and salt. Add the cold, cubed butter and blend using a pastry cutter or fork until the mixture resembles coarse crumbs.
Gradually mix in the ice water until the dough comes together. Shape the dough into a disk, wrap in plastic, and refrigerate for about 30 minutes.
Preheat the oven to 375°F (190°C).
Roll out the chilled dough on a floured surface to about ¼ inch thick. Cut out circles slightly larger than the muffin tin cups.
Gently press each dough circle into the muffin tins, ensuring it covers the base and sides.
In a small saucepan, combine the brown sugar, corn syrup, melted butter, eggs, vanilla extract, and salt. Whisk until smooth and well combined.
If using, sprinkle raisins or chopped walnuts into each pastry shell.
Pour the filling mixture into each pastry shell, filling them about ⅔ full to allow for expansion during baking.
Bake in the preheated oven for 20-25 minutes or until the filling is bubbling and the pastry is lightly golden brown.
Remove from oven and allow to cool in the muffin tin for about 5 minutes before transferring to a wire rack to cool completely.