It is possible in a pptm file though creating a ppam AQddIn might work better
There is a learning curve though and you should be able to use OfficeRibbonXEditor or something similar to add the custom XML part needed.
I have attached a pptm file with a very simple macro and the XML to run on Ribbon Load - NOTE IT will not work for a ppsm file that doesn't have a ribbon
runMe.pptm