Electrochemical tuning of heterojunctions in TiO2 nanotubes for efficient solar water splitting