The law states that people on bikes should ride as far right as practicable, but what exactly does that mean?
It does not mean that you have to ride in the gutter -- never ride there. If you’re on a road that is too narrow to share with another vehicle, you should be in the middle of the lane. You do not want to give motorists the opportunity to try to squeeze past you. When the lane is wide enough to share (around 14 feet), you should place yourself three feet away from traffic.
Source: League of American Bicyclists