In a bowl, mix together the flour and salt. In another cup, dissolve the yeast in warm water with a pinch of sugar and let it sit until frothy.
Make a well in the center of the flour mixture and add the yeast mixture and olive oil. Mix until a dough forms.
Knead the dough on a floured surface for about 10 minutes until smooth. Place in an oiled bowl, cover with a damp cloth, and let rise for 1 hour.
Preheat vegetable oil in a deep pan to 350°F (175°C) for frying.
Divide the dough into equal portions and roll into circles. Add a spoonful of tomato sauce, mozzarella, and ricotta (if using) in the center.
Fold the dough over to create a semi-circle and seal the edges tightly.
Carefully place the panzerotti in the hot oil and fry until golden brown on both sides, about 3-4 minutes per side.
Remove with a slotted spoon and drain on paper towels. Garnish with fresh basil if desired.