The influence of gas-phase oxygen on the growth of Au nanoparticles on Mo-doped CaO films has been investigated by means of low temperature scanning tunnelling microscopy and X-ray photoelectron spectroscopy. Whereas at ideal vacuum conditions, only 2D Au islands develop on the oxide surface, the fraction of 3D deposits increases with increasing O2 pressure until they become the dominant species in 10-6 mbar oxygen. The morphology crossover arises from changes in the interfacial electron flow between Mo donors in the CaO lattice and different ad-species on the oxide surface. In the absence of O2 molecules, the donor electrons are predominately transferred to the Au ad-atoms, which consequently experience enhanced binding to the oxide surface and agglomerate into 2D islands. In an oxygen atmosphere, on the other hand, a substantial fraction of the excess electrons is trapped by adsorbed O2 molecules, while the Au atoms remain neutral and assemble into tall 3D particles that are typical for non-doped oxides. Our experiments demonstrate how the competition for charge between different adsorbates governs the physical and chemical properties of doped oxides, so widely used in heterogeneous catalysis.