Your 4 inch long lag screws have to go through 1.5 inches of 2x6 plus at least 1/2 inch of drywall. That leaves a total engagement of 2 inches into the wall studs. I would not go shorter on the lag screws. Remember, these screws have to carry the repeated load of pulling and pushing the door open and closed.
I agree with JohnL, you need to use a ratchet wrench or at least a box wrench of the proper size to get enough torque to run these fasteners home. 5/16 inch diameter lag bolts would be the minimum size to use.
Good Luck!
Dodgeman