If I don’t leave this answer to temporary_user_name who should nevertheless turn his/her comment into an answer as it is the essential of what has to be said, it is because a non negligeable detail is part and parcel of the answer.
You absolutely never say “un producteur de des tomates” (see temporary_user_name‘s comment or answer).
As said in the comment referred to, you will almost always say “un producteur de tomates”. The word “tomatoes” in this context of production in general is not determinate, it means tomatoes of any sort, for any purpose; so there is no article (either language, “de” is not an article here but a preposition).
“Un producteur des tomates” is a rare possibility, that being so because of the occurrence of a rare context. Let’s give an example of those rare contexts.
Suppose a given food manufacturer relies on several farmers growing the vegetables needed for the ready cooked dishes and suppose further that not just one but several farmers are responsible for providing tomatoes. Then when you refer to tomatoes in this business of preparation of food you can talk about “the tomatoes” (in both English and French) as you can talk about this concept specifically in relation with the use that is made of them in the firm; in other words you are talking about particular tomatoes, those that concern the dishes, they might have to be not too ripe and/ or be of a given variety or at the simplest their particularity has to be considered to be that they are an ingredient; the article is then “the” (“les”), definite article. I hope you understand that already but I thought useful to recall this grammatical principle in the use of “the” (le). If you want now to talk about those people providing those tomatoes, you will have to say, apparently, “les producteurs de les tomates” but because in French this “of the” combination (“de les”) is always contracted into “des” you say “les producteurs des tomates”.
You might also want to speak about just one of the farmers involved in providing those tomatoes and then you have to say “un producteur des tomates”.
Of course this is a personal choice. if you don’t want to be specific about the tomatoes, while talking about the food firm’s suppliers you can say “un producteur de tomates”, les producteurs de tomates”.
Which is correct?
The first is incorrect. The second might not mean what you expect.
Le producteur des tomates. The producer of the (de les) tomatoes (we are talking about).
Or in French grammar, should we use “les tomates” instead of “des tomates”?
We can use both depending on the intended meaning but in your case the most plausible expression would use the partitive article de:
Le producteur de tomates. The tomato producer.
For all intents and purposes, the contraction of "de des" (and "de du") is de. It’s a bit unintuitive since only a small subset of occurrences of de will function that way, but you can see it clearly by observing the behaviour of almost synonymous verbs but that takes different complements:
J’ai pris la forteresse – Je me suis emparé de la forteresse
J’ai pris les forteresses – Je me suis emparé des forteresses
J’ai pris des forteresses mal défendues – Je me suis emparé de forteresses mal défendues
This de also behaves as a contraction in having to be present on each member of a coordinated series:
Je parle de toi et (de) moi
Je parle du présent et du passé (never "du présent et passé")
Je parle de pain et de grain (never "de pain et grain")
As the other answers have said, the only possible interpretation of "un producteur des tomates" would be "a producer of those specific tomatoes we already talked about", in other words a definite one. "Un producteur de tomates", on the other hand, allows an undefinite reading, but it’s a bit unclear if the underlying syntax is that of a compound noun or the result of a contraction.