The beam on the front and back walls of a shed and will be extending out to support the roof overhanging the sides of the shed. So instead of using a typical 2x4 top plate for the walls and putting the beam on the top of that, can I just nail the studs into the 4x6 beam?
I am confused as to the purpose of a 4X6 to support the roof overhang. Are you using rafters and collar ties? The rafter tails are usually what an overhang is created from.
You should consider the conventional way of using a double 2X4 top plate. The second or top 2X4 plate overlaps corners to lock adjacent the walls. A top plate of 4X6 would be very difficult to nail or screw to your studs without metal plates. I see no advantage to using an oversize plate.
Maybe I'm missing the point of the question however.
It doesn't sound like a bad idea, provided that beam is well-supported along its length (for instance, consider doubling or tripling up on the 2x4s for one stud every few yards). The only thing you'll have to consider is that, if you don't have a top plate and you ever want to take the wall down but leave the beam in place, it'll be more of a job because you can't just take the spikes holding the plate to the beam out.
If the 4x6 is going to be enough to support the roof overhangs (and depending on the design of your shed, potentially the whole roof + any snow load), there's no reason you couldn't use it for a top plate.
However, a 4x6 of any length is going to be heavy, and if it's doing double duty as your top plate it could make raising and setting the wall difficult if you're working solo. If you go with a conventional set of 2x4 plates you can raise the walls and then lift the 4x6 onto them, which might be an easier job.
The conventional way of extending out to support a roof system is to use your top plate like you should and run a 2x10 or 2x12 band nailed upright with the outside of your wall on the top plate. You would then place blocks about 2 ft apart and place another 2x10 or 2x12 against it doubling the band on the outside where your roof is going to sit. After you would run another plate on top. You would want to band your building all the way around and set you joist in between the bands. This will allow you to run a plate on top of your joist for the rafters.
What you can do after is run your joist out to catch your beam on the outside of the house. If your joist run the other way, you would leave your last joist on the inside of your top plate and then run your joist out to your beam on the outside.
A 4x6 beam is a little over kill for a top plate.