Yes, you may use pure pumpkin puree in place of mashed bananas as a 1:1 replacement. Bananas are sweeter than pumpkin puree, so it's a good idea to add a bit more sugar to balance out the sweetness when using as a cooking substitution.