Determination of refractive index profiles in diffused optical waveguides