The migration of carriers in optically pumped semiconductor structures with quantum dots is investigated using a confocal setup. Experiments are performed in order to test the performances of the optical setup. The samples studied by optical confocal microscopy are the following: semi-insulating GaAs, InAs quantum dots grown directly in GaAs, InAs quantum dots grown inside a Ga0.85In0.15As quantum well and a Ga0.85In0.15As quantum well with GaAs barriers. Measurements are done in a range of temperatures starting from 78 K up to 295 K. A theoretical model for the migration length is presented. The solution of a diffusion-type equation is used to fit the experimental data.