Optical and structural investigation on rare-earth-doped aluminophosphate glasses