Wavelength- and material-dependent absorption in GaAs and AlGaAs microcavities