Proton inelastic scattering at intermediate energies and Dirac-equation-based optical potentials