Donor-related levels in GaAs and AlxGa1-xAs