Short answer: No.
Long answer: It depends.
Are you willing to lose full root access? If not: it cannot be done. The root user is, by definition, the user that can do everything including totally and utterly destroy the system, but also read and write all files. I answered a similar question here. It is logically impossible to both be root and not have access all files.
However, if you are willing to give up root access, you can. You just need someone else to have root on your machine (Let's say your spouse - I mean, this is about porn, isn't it? I know it is... It always is.), and you get an account without root rights: A so called "Standard User". At that point, you will not be able to edit that file because you're not in the sudoers group. Your spouse will. However, it comes with the limits of not being able to install software and do other system maintenance tasks.
This isn't a full protection. Unless the disk is encrypted (and you don't have the password), you can still boot withe a LiveCD/USB and go modify the file. Technically, protecting you from yourself is close to an imposibility.