For a weakly interacting Bose-Einstein condensate in a double well, an appropriate time-dependent modulation of the trapping potential counteracts the "self-trapping" effects of the interactions, thereby allowing tunneling between the wells. It is demonstrated numerically that this modulation can be employed for transferring the condensate from one well to the other in a controlled way. Moreover it allows the production of mesoscopic entangled states on short time scales.