Just to clarify, killing your own slaves was only illegal under certain circumstances. Originally, in Roman Law, killing your own slave (as killing your sons and daughters and other parts of your household, given sufficient reason - f.e. catching your daughter in flagrante delicto of adultery) was the prerogative of the head of the household, the pater familias or father of the family. Killing unfree persons was not a matter for early Roman criminal justice, since murder, or parricidum was only an offence that could be committed against free persons. Slaves were things for Roman law, and as such you were liable for recompense to the owner of the slave, but if it was your own slave, there was no case to be made here.
Later developments also saw the possibility of punishing the killing of slaves belonging to others as parricidum, Gaius (mid 2nd century) mentions the possibility of pursuing legal action against the killer of ones slave both after the lex Aquilia (for damage done against one's property) as well as in a capital trial, but not for killing your own slaves. However, already in the first century the emperor Claudius had promulgated that people who killed their own slaves for being incapable of work were liable to be tried for murder, as Sueton recounts:
When certain men were exposing their sick and worn out slaves on the Island of Aesculapius because of the trouble of treating them, Claudius decreed that all such slaves were free, and that if they recovered, they should not return to the control of their master; but if anyone preferred to kill such a slave rather than to abandon him, he was liable to the charge of murder [Suet. Claud. 25, 2]
The same Gaius also mentions that under the emperor Antoninus Pius (161-180), those who killed their own slaves 'without reason' (qui sine causa servum suum occiderit, Gaius 1, 53) were to be punished as if they had killed another one's slave. Such sufficient reason could be found if the slave was found guilty by a court held inside the household, and later law, found in the Digests from the 3rd century legal scholar Ulpian specified that it was not illegal to kill slaves for the heir of the household, even if these slaves were already bequeathed to another one in a will, as long as it was 'well deserved because of a misdeed' (ob facinus, hoc est merentem, Dig. 30, 53, 3). From another part of the Digests, concerning a similar situation:
Where anyone owes me a slave under the terms of a stipulation and he surprises him in the act of committing a crime, and kills him with impunity, a praetorian action cannot be brought against him. (Dig. 45, 1, 96).
This is to show only that killing your own slaves was not really illegal apart from certain cases, up into the 6th century when Justinian had the Digests compiled, but in many cases expected - injured parties would bring the slaves over to their masters to have them exact punishment against the slave, up to and including killing them. There were some restrictions regarding killing your ow slaves in punishment int later Roman law, and the codex Theodosianus (in IX, 15, 1 = Iust. IX, 14, 1) specifies that, while someone whose slave dies during the course of punishment by regular means should be free from punishment, but it also specifies, in rather colorful language, that
he will become guilty of homicide if he should intentionally inflict a fatal wound upon the slave by means of rods, stones, or weapons; or order him to be hung; or direct him to be hurled from a precipice; or give him poison; or lacerate his body publicly by the application of iron hooks to his sides; or burn his limbs with fire; or cause his joints to waste away by depriving them of their humors and blood; or deprive him of life by means of torture worthy of the cruelty of the most savage barbarians.
However, this was not really making killing your slaves illegal, as long as you followed the usual course of actions. Normal means of coercion or punishment were still legal, even if the dominus killed the slave during the course of the punishment, it just specified some methods of cruel and unusual punishment that could lead to a conviction. This was an edict by Constantine, and the same emperor explicitly specifies that:
We don't want it to be researched in such a thing, in which it is the interest of the master to keep unimpaired rule about his own things, whether the castigation seemed to have taken place with the interest to kill a man, or if it simply happened. For always when the master, with simple means, exercises his domestic powers, he should not be convicted of murder for the death of a slave. [cod. Theod. IX, 12, 2].
A master always should keep the right to kill his own slaves, if it was for a reason. To summarize, the only thing that ever was illegal with regard to your own slaves, was, from the 1st and 2nd centuries on, either killing someone just for being unable to work, or killing your slave without 'sufficient' reason. And whatever that sufficient reason was would be for a court of law from the masters peers to find out, if a lawyer could be find to bring the case to trial on behalf of the dead slave. This, because one of the main things to keep in mind with Roman criminal law, is that there is no attorney of the state. To bring a criminal case to trial, you would have to find a willing lawyer, and pay him.
Sadly, I know of no examples where such cases were tried, but the question of how liable a master was in the death of one of his slaves must have come up from time to time. It is quite possible that especially Constantines activity in that regard might have been caused by Christian masters worried about the legality of killing their slaves, since Christianity usually does not tend to look to kindly upon that.
Edit: cleared up the language a bit.