Thinking about the question could begin with the related question, "Can AI learn what a lie is?"
If an intelligent being can distinguish truth from lies, then it can be programmed to lie or not lie or decide between them, assuming it is not programmed to be fully autonomous, in which case it would decide for itself based on its own ideas and objectives and couldn't be reliably programmed at all.
Is the intelligent perception of a lie something that has a counter example or a proof of its falsehood, or is a lie meaning in this question a ruse or subterfuge? In the links in the question, this second meaning is implied.
The robots in question are not aware of ethics and values regarding honesty, so they have no mapping. In game theory, algorithms can be adjusted to not bluff, which is simply the removal of an intentional bluffing option in the algorithm, but to avoid learned strategies that involve misrepresentation would require the recognition of misrepresentation. That's a very limited example of programming a robot not to lie though.
What is a lie? Some ethical positions might consider a lie something represented as true that is only conditionally true. Other ethical positions might consider a lie something represented for self-serving purposes that is not a proven fact. Thinking about these two ethical positions, they are distant rules of communication from one another.
Can AI be programmed to not to lie? It depends on what kind of AI and what kind of lie.
Can AI learning be directed away from dishonesty? Yes, with considerable requirements definition around what a lie is and how learning can be directed away from lying. In simple machine learning, the loss function would need to increase as the result approached some form of lie. Logical systems would, if following the rules of inference, not lie because the rules of inference are always directed toward truth on the basis of axiomatic truths given it.
DNA evolution never lies. A live organism may play dead, but a dead organism cannot play live, and necrophilia does not produce offspring.