Studying trivalent/bivalent metal ion doped TiO2 as p-TiO2 in bipolar heterojunction devices