Correlation of compensation in Si-doped GaAs between electrical and optical methods