Diffusion of Heavy Elements in White Dwarfs with Radiative Forces and Mass Loss