That will work to turn your PIC ON, and have the PIC switch OFF... D2 and R4 are then not required.
However, if you require a Button-OFF function, then you need to tell the PIC that the Button has been pressed. In that case D2 and R4 are required and in your circuit you will then have omitted to take a line from the D2/R4 junction back to an available PIC pin.
Bookmarks