California's Civil Code Section 3342 covers dogs. Yours is a strict liability state, which gives more power to the victim and less to the dog owner. Regardless of the dog's past history (which you indicate is a history of biting), you are responsible for any damage your dog causes. Your insurance might cover most of the expenses involved (medical costs to your roommate's guest, etc) but not court expenses.
Your problem is going to be that, as the owner of a dog that has bitten in the past, it is YOUR duty to ensure the safety of others, not your roommate's. In a strict liability state, with a dog that has bitten in the past, you may have a harder time proving that the guest "provoked" your dog into biting. You would have been in much better shape if the guy your dog bit was a trespasser.
The court, if there has been 2 or more actions against you and your dog in the past, may order the removal of your dog from your home or his destruction.
I would call the Humane Society, to see if they can recommend a lawyer that can defend your dog. He will need a good defense attorney and the Humane Society hates to see healthy animals euthanized. It would be a good start, at any rate.
A lawyer on this forum may post with additional action you can take.