Can a solenoid have its magnetic field "focused"?
In short NO.

A solenoid would produce a field similar to what you show in the second "picture". The only difference you could make would be to increase or decrease the amplitude of that field (or make it negative). Although this field is for the most part inside the solenoid (not the outside).

The simplest way to do something similar to what you're after would be to split the coil into two. Then alter their amplitudes so that you get maximums or null fields where ever you want with relation to the center of both of those coils by simply changing the magnitude and direction of either coil. Using 2 PWMs with simple filters and 2 solenoids you could accomplish pretty much what you're after.

It would look something more like this:

////////////   ////////////////  
     &lt;       ~~~       &gt;                            
////////////   ////////////////


Where the field can be "moved" anywhere between the two greater/less than signs.