You're correct in saying that you can pick any trade-off of shutter speed and aperture size that you want, so long as you obtain the same exposure (or as you say, number of photons hitting the sensor). In practice, your choice of aperture will depend primarily on one thing: your desired depth of field.
You will obtain higher quality images by reducing the ISO (which is essentially a digital multiplicative factor; it increases noise as well as signal), assuming there is no motion blur and the shot is well focused.
If you don't care about the bokeh, or depth of field, and you also don't care about having to wait 30 seconds for every exposure, then you should shoot at the aperture which produces the sharpest images with your lens, and at the minimum ISO available. Data on lens sharpness at various apertures can be found at DxOMark.
For instance, here is the sharpness data for my D7000 + Nikkor AF-S 50mm f/1.8 G:

This tells me that the sharpest images (taking into account everything in the frame in some sensible manner; edges are invariably less sharp) are produced at about f/4.5. This is the case for almost all lenses: they aren't too sharp at their maximum aperture. You usually should go for an f number somewhere in the middle of the lens' range for maximum sharpness. The reasons for this are a bit technical so I won't go into that.
Bottom line:
- Does shutter speed matter to you? Do you want to be waiting 30 seconds for each exposure?
- Does depth of field matter to you? Do you want to isolate your subject using bokeh?
- Lower ISO will produce less noisy photos.
Consider these factors in combination with the lens sharpness. If you have a lens worth US $1000+ then lens sharpness is probably a non-issue. If you have a kit lens, then it will matter more. Especially if it's a zoom-- in that case, focal length affects it too.