"Don't tell it to me" is a little less awkward, and also accepted. But it's still peculiar -- I think the natural English sentence would be "Don't tell me that!"
Edited to add -- As someone below suggests, it does work as the answer to "You know the answer? Don't tell it to me!"
I agree. It also adds the frustration that duolingo doesn't naturally go for contractions when offering words for sentences. I think "don't tell me" is used generally to tell someone not to reveal/ 'give away' something or to cut someone off when they want to give away/reveal something.
It's definitely a little weird, but I tend to stick with as literal a translation here as is possible without it being really unnatural or wrong. If I was saying this in English and not translating I'd be most likely to just say "Don't tell me" and leave the object implied.
I'm a native English speaker and I think "do not tell me it" sounds natural. As usual with these DL exercises you have to imagine more possible contexts.
E.g. I think this would be a perfectly normal answer to "Do you want me to tell you the answer??" when quizzing someone about trivia, and they reply with emphasis "Do NOT tell it to me!".
Both "it" and "that" are very similar in practice. No me digas eso and No me lo digas mean more or less the same thing but the latter may be more common in Spanish. But, "Don't tell me that" would be more common in English. So, in practice, yes, it would be a better translation if you translate the entire sentence and not word-for-word.
However, people learning Spanish need to know that lo literally means it and not that in most cases. So, that may be why Duolingo is more strict about it in this case. However, I hear lo a lot in cases I would have used that in English.
I think "Don't tell me it" sounds clumsy because it's incomplete. With more context, it does sound more natural but "it" would translate to "que" and not lo in these sentences. I searched on "don't tell me it" and got these results:
Don't tell me it could be worse = No me digas que podría ser peor
Don't tell me it can't be done = No me digas que no se puede hacer
Don't tell me it's over = No me digas que se acabó
In an attempt to simplify, sometimes Duolingo sentences just end up sounding weird.
I've seen a lot of good consensus here that DL's English is awkward on this one and a fair number of improvements, but they all miss the point that this common Spanish phrase has to be translated idiomatically, and not literally (that includes my own suggestions, which were better English, bit still poor translations. Here, the most direct translation is "you don't say". Of course, in American English, that sounds a bit archaic. We would reall tend to say something even more idiomatic, like "really" or "no way" or in some cases just an exclamation like "wow", all depending on context/tone/opinion of the first speakers original phrase. None of these more literal choices is even close to being a translation of the original phrase.
Actually, they ARE using the imperative. The trick here, is that the NEGATIVE imperative, is different than the POSITIVE imperative, and happens to be the same as the subjunctive, thus, you thinking they'd went all subjunctive on you, when they were really still just ordering you around in the imperative, albeit in the negative sense. Clear as mud? Didn't make any sense to me at first, and not much now, but, that's just the way it is in Spanish.