Structural and optical characterization of Ag-doped TiO2 nanoparticles prepared by a sol–gel method