Repulsion-to-attraction transition in correlated electron systems triggered by a monocycle pulse