Large enhancement of the photovoltaic effect in ferroelectric complex oxides through bandgap reduction