You can. I prefer to use canned pumpkin when baking. Fresh pumpkin puree tends to have more moisture in it, but you can always soak up some of the liquid with a tea towel before adding to the batter mixture.