I would think there are certain situations where a person might be compelled to lie, such as if you have a security clearance, have signed an NDA, or are acting as an informant. That is, a person may have to lie to prevent divulging classified or secret information through implication.
EDIT: One situation where the government cannot compel you to lie is if it violates your fifth amendment rights (self incrimination).
those are all things you actively agreed to, in advance, in exchange for some sort of consideration (job, not going to jail for illegal things you've already done, etc)
EDIT: One situation where the government cannot compel you to lie is if it violates your fifth amendment rights (self incrimination).