Rather than stop and ask them to be quiet so that others could hear, I simply continued speaking but walked to the back of the room where I went on with my lecture. I never explicitly acknowledged the two nor stood by them to embarrass them, but instead continued to address the class. I found that this movement alone not only kept the attention of the ones who had already been paying attention, but also captured the attention of the two who were talking. In a short while I was able to walk back to the front and finish my lecture at the board without distraction. By doing this I found that I could get the attention of a slightly disruptive few without stopping my lecture or explicitly embarrassing them.
Students seem much more willing to learn under such circumstances.