I've always read that all things that affect opioid recptors are called opioids; this includes, natural, semi-synthetic, and synthetic analogues.
Opiates are just their natural counterparts.
If you were to look at it like a file path on a computer...it would be like:
Drugs/Analgesics/Opioids/Opiates
Although that probably needs to be changed up a little bit as not all opioids are used in the treatment of pain.