Synergetic control of band gap and structural transformation for optimizing TiO2 photocatalysts