Optical model analysis of proton-carbon elastic scattering in the range 20 to 50 MeV