A bi-functional structure with tunable electrical and optical properties for organic photovoltaic cells