Towards Safe Imitation Learning via Potential Field-Guided Flow Matching