Rather an emotive subject and the answers you'll get will vary greatly.
As pointed out above nitrate itself isn't overly toxic to fish, the toxic part comes via ammonia and nitrite ( the nitrogen cycle.) If you surf the Web the figures for safe nitrate levels accumulating via this cycle will range from 5ppm up to 80ppm, I wouldn't suggest you run a tank at the high end of this scale and suspect the low range number is in part fueled by the multi million pound industry that profits from folks trying to keeping nitrates low.
I would imagine the 20 to 40ppm range you are aiming for is acceptable, i've certainly maintained fish only tanks at far higher levels than this in the past and fish health over the years wasn't compromised.