According to Andy at The Corner at National Review, Plame's CIA employment was classified, and thus it appears that Libby may have thought he violated the espionage act (because he technically arguably did), and thus he had a motive to lie to the grand jury. His motive was to avoid admitting to one of the requisite elements of the espionage act, which is that one in his official capacity received the information one lawfully entitled to know (ie from Cheney), and then disclosed it an improper person, ie a reporter. By testifying that he learned it from a reporter, that avoids his admitting that he learned it in his official capacity from one entitled to know, and thus in his mind, admitting having committed a crime. In short, mystery solved. We have a motive.
Assuming Valarie's job was classified, how do we know Libby knew that her job was classified? Not all jobs in the CIA are classified. If Fitz was going to use the Espionage Act, he would also need to prove that Libby knowingly released classified info with intent to harm the U.S. The CIA's own damage assessment showed their was no damage (except maybe a new name plate for Valarie). The only intent that Libby had was to refute Wilson's lies.
If Libby wanted to avoid admitting he knew something, why not use the "I don't recall" or "I am not sure if it happened that way" and avoid false statements as well.
As to motive, there are multiple allegations about how Libby learned about Plame from others in the government before he ever talked to reporters. There is no allegation that Libby denied any of this. Later, in the perjury counts, his excerpted testimony has him explaining that when he talked to Russert he had forgotten that he already knew about Plame. So, I infer that Libby admitted to his prior knowledge, and then tried to reconcile that with his prior testimony that he learned it from reporters by saying he forgot that he knew.