If you're willing to (or allowed to) switch to typewriter (monospaced) font, you won't encounter the problem: the regular and bold fonts have glyphs of the exact same widths.
The following MWE uses Courier
(scaled 5% in order to equate the cap-heights of the mono and text fonts in use), because in that font the difference between medium weight and bold is particularly strong. The lmodern
package has a bold mono font as well, but the difference to the medium weight isn't as pronounced.
\documentclass{article}
\usepackage[scaled=1.05]{couriers} %%
\begin{document}
\noindent
\texttt{The quick brown fox 012456789}\\
\texttt{\bfseries The quick brown fox 012456789}
\end{document}
Another font package possibility you may want to consider is arev
. (Given that you seem to be preparing for a beamer presentation, using the arev
package would be a good choice anyway.) In the arev package, the mono font harmonizes well with the text font (which is a sans-serif font), and the medium and bold mono fonts are quite different.