The effect of gas accretion on the radial gas metallicity profile of simulated galaxies