Observation of the production of a W boson in association with a single charm quark