Preheat the oven to 190 degrees C. Grease baking trays.
In a large bowl, cream together the margarine and white sugar until smooth. Beat in the eggs one at a time. Stir in the vanilla and pumpkin until well blended. In a separate bowl combine the flour, bicarb soda, baking powder, salt, cinnamon and nutmeg then stir into the pumpkin mixture. Mix in the chocolate chips. Stir in the walnuts if desired. Drop by teaspoonfuls onto the prepared baking trays.
Bake for 12 to 15 minutes in the preheated oven until edges begin to brown. Allow to cool for a few minutes on the baking trays before removing to wire racks to cool completely.