We present a very efficient numerical strategy for computing contact discontinuities in traffic flow modeling. We consider the Aw-Rascle model, and the objective is to remove spurious oscillations generated for instance by the Godunov method near contact discontinuities. The method is mixed and based on both a random sampling strategy and the Godunov method. To prove the validity of the method, we show that it enjoys important stability properties and propose numerical tests. The convergence of the algorithm is demonstrated numerically.