In the RGUI menu in FCEUMM I just edited my buttons to have Y on my SNES pad act as B and B on my SNES pad to act as A. Then I turned Configuration per core to ON and Configuration save on exit to ON and then chose Quit RetroArch to save these settings. When I exited and booted up a NES game my buttons were saved to this new configuration.
I had experience with this previously on the Wii port of RetroArch and it worked so I figured I would try it on my RetroPie.
I also just tried this on lr-fba and changed my buttons for Street Fighter III 3rd Strike, now I can have my weak punches and kicks on the shoulder buttons and my mediums and strongs on the face buttons. Saves me changing them each time I boot up that game.