Yes, you can cook them directly. From the rulebook, p.9:
1 Sheep (Stage 1): Place 1 Sheep on this space in the Replenish phase (Phase 2) of each round. A player who selects this action takes all the Sheep from the Action
space and must either put them into his farmyard or use an Improvement
to turn them into food. Sheep that cannot be pastured or turned into Food are returned to the general supply.
The same applies to the other animal spaces.
This is an important tactical option. The threat of having all the sheep grabbed and devoured often forces a player with pastures to pick the sheep up sooner than they might like.
So in your example, yes you may cook three and keep one, or cook all four immediately, at your discretion.
On the other hand, during harvest you may not send a newly bred animal straight to the stew pot if you don't have room.
On p.4 of the rules:
Baby animals and parent animals may not be converted into Food immediately after the birth(for example, if you only have room for two animals of that type); they simply run away if they cannot be accommodated.