We address one of the main challenges to TiO2-photocatalysis, namely band gap narrowing, by combining nanostructural changes with doping. With this aim we compare TiO2s electronic properties for small 0D clusters, 1D nanorods and nanotubes, 2D layers, and 3D surface and bulk phases using different approximations within density functional theory and GW calculations. In particular, we propose very small (R < 0.5 nm) but surprisingly stable nanotubes with promising properties. The nanotubes are initially formed from TiO2 layers with the PtO2 structure, with the smallest (2,2) nanotube relaxing to a rutile nanorod structure. We find that quantum confinement effects - as expected - generally lead to a widening of the energy gap. However, substitutional doping with boron or nitrogen is found to give rise to (meta-)stable structures and the introduction of dopant and mid-gap states which effectively reduce the band gap. Boron is seen to always give rise to n-type doping while depending on the local bonding geometry, nitrogen may give rise to n-type or p-type doping. For under coordinated TiO2 surface structures found in clusters, nanorods, nanotubes, layers and surfaces nitrogen gives rise to acceptor states while for larger clusters and bulk structures donor states are introduced.