A Florida police officer has been sacked after accidentally shooting a driver while taking his gun during a traffic stop.