Optical spectrum, local lattice structure and EPR g factors for Cr3+ impurity ions in MgTiO3 and LiTaO3