We extend the program potfit, which generates effective atomic interaction potentials from ab initio data, to electrostatic interactions and induced dipoles. The potential parametrization algorithm uses the Wolf direct, pairwise summation method with spherical truncation. The polarizability of oxygen atoms is modeled with the Tangney-Scandolo interatomic force field approach. Due to the Wolf summation, the computational effort in simulation scales linearly in the number of particles, despite the presence of electrostatic interactions. Thus, this model allows to perform large-scale molecular dynamics simulations of metal oxides with realistic potentials. Details of the implementation are given, and the generation of potentials for SiO(2) and MgO is demonstrated. The approach is validated by simulations of microstructural, thermodynamic, and vibrational properties of liquid silica and magnesia.