'Mudblood' is used in the books quite a lot, mostly by characters who define themselves as blood purists. It is a word used by characters who hold a certain set of opinions about the importance of the purity of magic blood, so if you're neutral on the subject, better use 'muggle-born' else you'll probably confuse people who read your question.
Clarity above niceties
There are, however, cases when you probably should use the infamous and oh-so-nasty M-word, even risking to offend the muggle-born wizards amongst us:
When you're interested in said word's etymology, usage etc.
when you're quoting from the books or book-related material (for example: Why did Draco call Harriett Potter 'my cute little mudblood'?)
if you really, really want to use it.