We have developed a two-level computational model that enables us to calculate electrostatic fields created by a semiconductor membrane submerged in electrolytic solution and investigate the effects of these fields on the dynamics of a polymer translocating through a nanopore in the membrane. In order to calculate the electrostatic potentials and the ionic concentrations in a solid-state nanopore, we have self-consistently solved Poisson equation within the semiclassical approximation for charge carrier statistics in the membrane and electrolyte. The electrostatic potentials obtained from these simulations are then used in conjunction with Langevin (Brownian) dynamics to model polymer translocation through the nanopore. In this work, we consider single-stranded DNA (ssDNA) translocation through semiconductor membranes consisting of heavily doped p-and n-layers of silicon forming a pn-junction which is capable of creating strong electric fields. We show that the membrane electric field controls dynamics of a biomolecule inside the channel, to either momentarily trap it, slow it down, or allow it to translocate at will.