Hi Mirela, In answer to your question whether farmers can shoot your dog because you allow it to go on his land. The answer is a very definite yes! If your dog is worrying sheep or any livestock and bear in mind at this time of the year many farmers have lambs & calves, then most farmers will not hesitate to shoot the dog.
It is also very dangerous for you to be on farmers land especially when cows have young, their instinct is to immediately protect, and have known to attack humans sometimes fatally. Do you ask the farmer permission, if not I suggest you do so, most farmers are obliging and will probably guide you to safe places on the land.
Remember it is their land, farmers don't let sheep & cattle loose in our gardens we must repect their property also. By the way my entire family are farmers, so I do know what I'm talking about.