That depends somewhat on your definition of optimal mining. The short answer is 24 probes on minerals and 3 probes per geyser. More probes will yield very little, if any, additional resources. If it is a high yield mineral expansion, then you need no more than 18 probes on minerals. That's 3 probes per patch of minerals.
The long answer requires that we look at the time it takes for a probe to pay for itself, and take into account when you will be needing those minerals for other purposes. Obviously, the latter is a judgement call based on many factors, ingame and even outside the game. We can however put a number on how long it takes a probe to pay for itself.
A probe costs 50 minerals and takes 17 seconds to produce, ignoring chrono-boost. Any probe that is the first or second to be assigned to a mineral patch, will yield 0.69 minerals per second. If it is the third probe to be assigned to a mineral patch, it will yield 0.32 minerals per second. In effect, probes #1 and #2 will mine 50 minerals in 50 / 0.69 = 72.5 seconds, and probe #3 in 50 / 0.32 = 156.3 seconds. Since you pay for a probe in advance, the production time must be included.
So the first 2 probes per patch, or the first 16 probes per base, will each pay for itself in 89.5 seconds. Similarly, the third probe per patch, or the next 8 probes per base, will each pay for itself in 173.3 seconds.
If you are planning on fighting a game-winning battle before a probe would pay for itself, it may not be worth getting that probe. However, if the battle does not result in a sure win or loss, you probably would've been better off having that additional probe for the long run.
When you expand, it is worthwhile to transfer any probes over 16 directly to your expansion, where they can gather minerals more efficiently. As a rule of thumb, it is best to split your probes evenly among your bases.