What do you call a slip of the tongue in writing?
It's called a slip of the pen (more common), or slip of the keyboard (less common).
Either is fine, and will be understood. If you desire to be precise with your idioms, go ahead and use "slip of the keyboard". It's not in as many dictionaries/thesauruses, but people use it, and it makes enough sense that no one should misunderstand it.
I also agree with KeithS: typo would be fine in many cases of "slips of the keyboard", however the "slip" idioms usually indicate more of a mistake in the writer's mind (wrong choice of word) than a typing error, as with "slip of the tongue". "Typo" usually has to do with a small mistake involving a few letters, which the typist did not mean to include, whereas "slip of the pen" or "slip of the keyboard" indicates a mistake of greater scale, such as choosing the wrong word, which, at the time, the typist usually did mean to include, but later realizes his mistake.
Technically speaking, any mistake made while producing a typed document given any other source material (including other typed documents) is a "typographical error", which is in turn a type of "clerical error". So, "typo" works whether the error is an obvious misspelling or mistyping, or something more subtle that would change the meaning of the statement.
Another option -although not commonly used in English- is to use the Latin lapsus.
If you want to be specific you can speak of a lapsus linguae (slip of the tongue) or a lapsus calami (slip of the pen).
Malaprop is an appropriate term to describe this sort of language usage error. Whether written or spoken, Dictionary.com and Webster's describe it as unintended misuse of words or phrases by confusion with one of similar sound or spelling. Examples writing "We will except him" vs. "We will accept him," or, humorously, "He had surgery for an unbiblical hernia."
According to grammargirl.com, specific usage errors can be broken down into: "Spoonerisms are what you get when a speaker mixes up sounds, making phrases such as better Nate than lever.
Mondegreens are what you get when listeners mishear words; for example when people think the song lyrics are Sweet dreams are made of cheese instead of Sweet dreams are made of this.
Eggcorns are what you get when people swap homophones in phrases, such as spelling here, here H-E-A-R instead of H-E-R-E.
Malapropisms are what you get when someone substitutes a similar-sounding word for another, such as He's the pineapple of politeness instead of He's the pinnacle of politeness."