Precise peculiar velocities from gravitational waves accompanied by electromagnetic signals and cosmological applications