Not being an expert, the best I can tell you is to check this link :
Basically, first ray trace your image with the ray command setting the size:
ray 1200, 1200
Then export it to PNG with the png command setting the dpi in the process:
png myfile.png, dpi=300
This should make the trick I guess.