In a large saucepan combine sugar, flour, cinnamon, cloves, allspice, and salt. Mix well, then whisk in egg, vinegar, and water. Add butter or margarine and cook mixture over low heat until thick, stirring constantly. Pour mixture into pastry shell.
Bake in preheated oven for 20 to 25 minutes. Cool before serving. Garnish with whipped cream if desired.