List posts by their custom taxonomy term, with a condition

You can directly add 'taxonomy_name'=>'term_slug' in your current code.

 $posts = get_posts(array(
          'post_type' => 'product',
          'file_type'=> $category->slug,
          'custom-category' => 'learning-units'
          ));

For more reference check WP_Query Taxonomy Parameters