Optical probing of the spin state of a single magnetic atom in a quantum dot