Yes. When creating or editing a coupon code (see this article for help), choose the This coupon code can be used with these products option for the Applies to field. You can then click the Add a Product... button to choose the product for which this coupon code can be applied. You can repeat this process to choose as many products as required.
When a customer has one or more of the products you selected in their cart and enters the coupon code, the discount will be applied to those products. If the customers has other products in his/her cart then the discount will not be applied to those products.

The article has been updated successfully.