You have two options using Read Preference:
Using nearest . This will make your app server reach a machine in the nearest group (15 ms ping distance of the closets member). However, if the machines on data center A are within the nearest group, those can be used for read as well. The driver recalculates the nearest group from time to time.
Adding a tag set in conjunction with nearest / secondary / secondary Preferred preference. For a better understanding read this short tutorial. You can set a "dc" tag for your data center B member, and adjust your application (java) driver to use this tag for reading accordingly.
Comment: If the app server / application is the major client of your replica set, it is better to have two members on data center B of course.