You can plead guilty while maintaining your innocence, it was done in the USA to avoid a death penalty, there are several reasons for doing it, if you think you may get a less severe sentence under the belief you will be found guilty although you still maintain you're innocence... Strange isn't it.. I realise these are American examples, but it does show it happens.
The Innocence Project - When the Innocent Plead Guilty