Random frequency and pulse repetition interval agile (RFPA) radars, distinguished by their superior electronic counter-countermeasure capability, show great potential in numerous applications. However, the wide distribution of distant sidelobes along the range dimension limits their practical application. The recently proposed multi-timeslot wide-gap frequency-hopping sequence paired with a lowpass filter (LPF) in the receiver offers a different perspective for the distant sidelobe suppression of RFPA radars. Nevertheless, the energy leakage from adjacent pulses' echoes within and outside the subband of each pulse's echo limits its performance. While the reduction of the former energy leakage has been addressed in one of our previous work, the reduction of the latter poses a challenge to the design of the receiving filter. Reducing the latter energy leakage by simply increasing the LPF's stopband attenuation extends its impulse response, which in turn increases the span of the near sidelobes of RFPA radars. The subsequent processing for near sidelobe suppression, such as the iterative adaptive approach based on matched filter outputs, also becomes computationally more costly. To address this issue, we formulate an optimal finite impulse response distant sidelobe suppression filter (FIR-DSSF) design problem for random multi-timeslot wide-gap frequency-hopping and pulse repetition interval agile (RMWFPA) radars. The optimization objective is to maximize the signal to distant- sidelobe-related interference ratio (SDIR) in the samples related to one range-velocity cell. By deriving a lower bound of the SDIR, this optimization problem is relaxed into a generalized Rayleigh quotient maximization problem independent of the probing scene. Then, we give its closed-form solution. Simulations demonstrate superior distant sidelobe suppression performance for RMWFPA radars with the optimized FIR-DSSFs without significantly increasing the span of the near sidelobes.