A penalty formulation and numerical approximation of the Reynolds-Hertz problem of elastohydrodynamic lubrication