A Cambridgeshire Police officer has been dismissed from the force for lying in court while giving evidence during a trial.