Adjusting the energy of interfacial states in organic photovoltaics for maximum efficiency