Conditional Generation of Image Sizes using add_image_size

Take a look at the intermediate_image_sizes_advanced filter. This filter receives the attachment ID in question, so with that you should be able to work out whether or not you want the intermediate sizes, and return an empty array if not.