Life imprisonment is only appropriate when the point of it is as much to keep the public safe as to punish the individual (where death is deemed inappropriate for whatever reasons). If people can't be rehabilitated then I don't see much other option (though obviously, this doesn't have to mean life in high security for inmates who are, in theory, at high risk of re-offence but otherwise non-violent/non-predatory).
Personally, i'm generally against the death penalty, but only because of the terrible 'oooops, we got the wrong guy' scenario.
EDIT: also, yeah, i'm exclusively talking about adult pedophiles here. Canada, for example, as age of consent as low as 14, but only when between peers.