Photoelectrochemical spectroscopy studies of titanium dioxide surfaces: theory and experiment