If the physician knows what the drugs are intended to be used for, and of course he or she does in this situation or he/she wouldn't prescribe them, he/she is still morally guilty and in violaion of his/her oath no matter how the law is worded.
What oath?!?