Study of structural transformation in TiO2 nanoparticles and its optical properties