Currently, referral codes can not be limited to particular products, categories, or customer groups and can be applied for any order in Magento. What you can do instead is set a minimum order value before the referral code can be applied to the order. 

This is functionality that we have on our road map and we'd like to add. If you are interested in this feature, please tell us by using the chat bubble - feedback like yours will help us  prioritize what features we should add next.

Did this answer your question?