Structural, electronic and optical properties of cubic SrTiO3 and KTaO3: Ab initio and GW calculations