Influence of environmental factors on molecular transport through bacterial membranes