We have obtained the three independent complex components P11(omega), P12(omega), and P44(omega) of the linear piezo-optical tensor P(ijkl)(omega) [DELTAepsilon(ij)(omega) = P(ijkl)(omega)X(kl)] of GaAs in the approximately 1.5-5.4-eV photon-energy range (visible UV) by applying static uniaxial stress (X) along the high-symmetry directions [100] and [111] and measuring the stress-induced changes in the dielectric function epsilon(omega). These measurements were performed using a conventional rotating analyzer ellipsometer at room temperature. The measured components of the piezo-optical tensor are in agreement with prior Kramers-Kronig analysis of piezoreflectance data. Each component of P(ijkl)(omega) is also compared with band-structure-based calculations performed with the empirical pseudopotential method. The calculations are in reasonable agreement with the experiment. Improved deformation-potential constants D1(1), D1(5), D3(3) and D3(5) for the E1 - E1 + DELTA1 transitions were also obtained from an analysis of the ellipsometric data. They compare favorably with theoretical estimates. In particular, the experimental value of D3(5) agrees rather well with band-structure-based calculations, in contrast with previous measurements of this parameter.