Optimal Mal'tsev conditions for congruence modular varieties