Electron acceleration and synchrotron radiation in decelerating plasmoids