On the Gamma-Ray Spectra Radiated by Protons Accelerated in Supernova Remnant Shocks near Molecular Clouds: The case of Supernova Remnant RX J1713.7–3946