Vacuum spacetimes endowed with two commuting spacelike Killing vector fields are considered. Subject to the hypothesis that there exists a shearfree null geodesic congruence orthogonal to the two-surface generated by the two commuting spacelike Killing vector Gelds, it is shown that, with a specific choice of null tetrad, the Newman-Penrose equations are reduced to an ordinary differential equation of Riccati type. From the consideration of this differential equation, exact solutions of the vacuum Einstein field equations with distribution valued Weyl curvature describing the propagation of gravitational impulsive and shock wave of variable polarization are then constructed.