We show that the critical temperature for the d wave pairing, which is due to the spin fluctuations in the 2D t-t′ model, can be even increased in the presence of the strongly momentum ( k ) dependent electron-boson (phonon, plasmon, exciton etc.) interaction. The condition for this effect is that, in comparison to the momentum-independent case, the electron-boson coupling must be increased at k ∼ 0 and decreased for large k . The possible mechanism for such a behavior of the coupling constant, based on strong correlations, is also discussed. The problem is studied self-consistently in the framework of the strong-coupling Eliashberg equations, by taking into account spin and charge fluctuations as well as the electron-boson interaction.