We report the results of a 10-year timing campaign on PSR J1738+0333, a 5.85-ms pulsar in a low-eccentricity 8.5-h orbit with a low-mass white dwarf companion. We obtained 17 376 pulse times of arrival with a stated uncertainty smaller than s and weighted residual rms of s. The large number and precision of these measurements allow highly significant estimates of the proper motion μα, δ= (+7.037 ± 0.005, +5.073 ± 0.012) mas yr−1, parallax πx = (0.68 ± 0.05) mas and a measurement of the apparent orbital decay, (all 1σ uncertainties). The measurements of μα, δ and πx allow for a precise subtraction of the kinematic contribution to the observed orbital decay; this results in a significant measurement of the intrinsic orbital decay: . This is consistent with the orbital decay from the emission of gravitational waves predicted by general relativity, , i.e. general relativity passes the test represented by the orbital decay of this system. This agreement introduces a tight upper limit on dipolar gravitational wave emission, a prediction of most alternative theories of gravity for asymmetric binary systems such as this. We use this limit to derive the most stringent constraints ever on a wide class of gravity theories, where gravity involves a scalar-field contribution. When considering general scalar–tensor theories of gravity, our new bounds are more stringent than the best current Solar system limits over most of the parameter space, and constrain the matter–scalar coupling constant to be below the 10−5 level. For the special case of the Jordan–Fierz–Brans–Dicke, we obtain the 1σ bound , which is within a factor of 2 of the Cassini limit. We also use our limit on dipolar gravitational wave emission to constrain a wide class of theories of gravity which are based on a generalization of Bekenstein’s Tensor–Vector–Scalar gravity, a relativistic formulation of modified Newtonian dynamics.