Yes, but you could risk a lawsuit and a criminal citation, depending on the facts.
Section 822.013 of the Texas Health and Safety Code allows a livestock owner to shoot a dog or coyote that is attacking, is about to attack, or has recently attacked their livestock, provided that the owner witnessed the attack.
But the dog’s owner is not without recourse, which can make it complicated for the livestock owner. An analysis of case law around the country published by the Michigan State University Animal Legal and Historical Center cites many cases in which the shooter was held liable, including a 1963 Texas case that strictly interpreted the health and safety code's “vicious dog” provision.
In City of Garland v. White, the Texas Court of Criminal Appeals said the statute applied only when the threat of attack was imminent, and the killing was a necessity. A city police officer was found liable in the case because the dog was neither at large nor attacking when the officer shot it.
Garland v. White also established that the proper response to a loose dog is to impound it.
Denton ordinances prohibit the discharge of a firearm in the city limits, a misdemeanor punishable by a $500 fine per incident.