A new simulation algorithm for lattice QCD with dynamical quarks