Magnetic and optical properties of Cd1−xGdxTe diluted magnetic semiconductor