PRODUCTION OF CHARMED MESONS IN Z DECAYS