Old, rusty bulb sockets are the pits to deal with. You might have to do some surgery on the tail light assemblies and adapt new, clean sockets to the housings, with dedicated ground wires running from the new sockets all the way from them to clean, tight connections on the frame. Ditto for the license plate light.
Jerry