Rare-earth doped optical fibers for temperature sensing