I would recommend taking the lane in these tight situations. You are less likely to be seen on the sidewalk and if the road is narrow you'll get yourself in a pinch if you ride too close to the gutter. You will have to force many motorists to pass you safely on these narrow roads.