If you were genuinely unsure of who was driving, despite every effort to find out, then neither of you could be prosecuted for speeding, and any S172 prosecution should fail due to the 'resonable steps' you'd taken to establish the driver's identity. I do object somewhat to the burden of proof of having taken these 'reasonable steps' lying with the defence, when it should be down to the prosecution to prove they hadn't, but since S172 is a malicious threat to compell a confession anyway its hardly surprising!
If however you were aware of who was driving, and attempted to both profess innocence/guilt in an attempt to avoid punishment one of you would be guilty of perjury if under oath, and both of attempting to pervert the course of justice. Both offences can attract a jail sentence.
In answer to your original question:
The prosecution can only compel a spouse to give evidence for the prosecution in cases which involve:
an allegation of violence against the spouse;
an allegation of violence against a person under the age of sixteen years;
an alleged sexual offence against a victim under the age of sixteen years; or
attempting, conspiring or aiding and abetting, counselling and procuring to commit the offences in the categories above.
I would not, however, expect this forum to be a place to find advice on how to avoid a charge of which you are knowingly guilty, though I am sure your question was purely hypothetical.