There are many factors: 1) species of wood, 2) moisture content of wood, 3) diameter of screw shank, 4) length of screw, 5) wood screw or lag screw (lag bolt), 6) Direction of loading.
1) Species: Where I live, we use Douglas Fir-Larch framing lumber. It's considered "dense". Other softer species have lower strength values...some as much as 40% less.
2) Moisture Content: Green lumber (unseasoned) will not tend to split as much as "dry" or "surface dry" lumber. Assuming your wall has been built and has been in a dry environment for more than a year, it should not split, even when you "shave it" (as you call it). Also, I'm going to assume the fasteners will be more than 7 times their diameter so they won't split the wood.
3) Diameter: Because the fastener needs to fit within the stud WIDTH, the diameter is limited to the minimum edge distance of 4 times the diameter...and that assumes you'll be equal distance from each edge of the stud.
4) Depth: Assuming a minimum of about 1 1/2" into wood, the screw needs to be about 2 1/2" long to account for the 1/2" drywall plus thickness of the metal hanger.
5) Screw or Bolt: You said screw so I'll use screw.
6) Loading: Fastening into stud will be side grain (not end grain, which is about 75% less). Also, because the TV is hanging on the wall, loading is a combination of shear and withdrawal.
Therefore, I'd use a #8 wood screw (0.164" diameter) x 2 1/2" long (to develop full resistance) which will give you about 95 lbs. withdrawal resistance in close or medium grain "dry" lumber per screw.
Remember, you can only "shave" a maximum of 1 1/2" off depth of stud (don't over cut or it will weaken stud) and don't over pre-drill diameter of hole. To develop full lateral strength, there needs to be lead holes drilled (pre-drilled). Lead holes should be about 7/8th the shank diameter. Therefore, I'd use a 0.1435" diameter bit. (1/8") If the screw doesn't go in easily, you can ease the installation by greasing it up by rubbing the screw in a bar of soap.