Well, if the force is in a different direction but still constant throughout the distance, the dot product would make it (F)(d)(cos0) where theta is the angle between the force and the distance. (0 = theta here)
In the case of variable direction but constant force, consider a constant electric field pointing to the right. You move a point charge in a perfect circle inside of this field. Force is constant so pull it out of the integral. Now you have integral cos(0)dx. Here dx is just an arc length, so dx=(R)(d0) where R is the radius. You must also change the bounds, from 0 to 2pi. Now integrate cos(0)d0 from 0 to 2pi. sin(2pi) - sin(0) = 0, of course the answer here is 0 since there is no displacement after completing the circle.
EDIT: Consider a half-circle (0 to pi) instead and see what you get. Note that this is the same as just doing a straight line of length 2R perpendicular to the force.
Now if the force is also dependent along the integrated space, you must also determine how to change variables so that you can represent all of the changes using just one variable (then integrate). This is not always possible of course