Charmed mesons with a symmetry-preserving contact interaction