Impurity effects on the generation, velocity, and immobilization of dislocations in GaAs