Preheat oven to 350F. Drain and rinse beans. Combine all ingredients except oats (and cocoa if using) in a food processor, blending until smooth and creamy. Stir in oats (and cocoa if using) then transfer to a square baking dish. Bake for 30 minutes or until a toothpick inserted comes out clean and the center is firm to the touch. Allow to completely cool before slicing or eating (the bars firm as they cool). The pumpkin flavor also intensifies the next day (make in advanced if possible).
Note: if you only have rolled oats, send them through your food processor first to chop them up so they are smaller and more granulated like instant oats.