An E. coli sample can be prepared for microscopy using the smear preparation technique. A small amount of the bacterial culture is spread thinly and evenly on a glass slide, followed by heat fixation to secure the bacteria to the slide.