Answer:
First of all, I don't think that most people who commit crimes really think it's okay, especially in a general sense. Not even specifically to their circumstances, for the most part. I have personally had contact with many non-violent offenders and most have accepted, to some degree, that they are guilty of committing a crime.
So, yes in my opinion there absolutely are times when it is alright (even a natural duty in some cases ) to commit a crime, but only if one is motivated by self preservation or the preservation of others; however no one has a right to take the life of other innocent persons no matter what the motivation may be.