Shock Acceleration of Electrons and Synchrotron Emission from the Dynamical Ejecta of Neutron Star Mergers