Gradual solar energetic particles (SEPs) are associated with interplanetary (IP) shock driven by coronal mass ejections. Testing theories/models that are built around shock acceleration mechanisms is difficult due to the complexity of SEP fluxes acquired by single-point measurements. To circumvent this, we correlate fast-forward shock Mach numbers derived from a 1.5D magnetohydrodynamics simulation with the intensity of solar energetic oxygen (O) and helium-4 (4He) particles acquired by instruments aboard the ACE spacecraft during a series of coronal mass ejections in 2003 (October 28 - 31). A good correlation at the 5% significance level is found for O and 4He with energy (E) > ~10 MeV n-1, with the peak correlation coefficient r = 0.82 for O (E = 63.8 - 89.8 MeV n-1) and r = 0.77 for 4He (E = 18.0 - 29.4 MeV n-1), respectively, for hourly averaged data. This result not only bolsters the causal relationship between IP fast shocks and SEPs, but also suggests that the Mach number of IP shocks is one of the major controlling parameters for the intensity of SEPs measured in the near-Earth space.