I'm not sure if I am being accurate about this but from what I know about diagnostics (watching House MD etc), if a doctor has a suspicion of a pathogenic infection then he/she usually prescribes corresponding medication without doing some kind of a confirmatory test. But isn't it possible to just have a look at the blood sample under a microscope and then confirm it? I guess it can't be done for viruses because they need an electron microscope to resolve them apart but I guess normal bacterias can be identified using more commonly available microscopes.
The problem with this is that A) the infection may be local, and very few if any bacterial cells may be in circulation, and B) even if the infection is systemic, there could be as few as a couple of bacterium per million red and white blood cells, making visual confirmation impossible. More often, if the attending physician feels the need for a direct ID in order to prescribe the correct medication, a culture is taken from the site of infection or blood is drawn, and then subjected to one of any number of different automated ID systems and/or culture conditions to identify the particular type of bacteria present. This can be as simple as Gram staining to identify Gram positive vs. Gram negative bacteria (different types of antibiotics work on the two classes) all the way to a full identification (genus, species, strain) based on molecular sequencing, typically of ribosomal RNA.