Efficient quadrature for highly oscillatory integrals involving critical points