Minimally generating ideals of rational parametric curves in polynomial time