If your platform has a very predictable simple motion like that, perhaps you could use a function which gives you a position, eg. the sin function gives a nice smooth oscillating movement. Each frame you would increment a value by a fraction of the period and take the sin of it, multiplied by the amplitude. Uhh... easier to explain in code I think.
theta += 0.025; //period
b2Vec2 targetPos( 0, amplitude * sinf(theta) ); //where the body should be now
body->SetLinearVelocity( framesPerSecond * ( targetPos - body->GetPosition() ) ); //make the body move to the correct position in one time step
That would give you a body going only up/down, but you could alter the x component in the same way to make it move in a circle, oval, wobbly etc.
The reason for setting velocity rather than position is to get the expected interaction with other bodies by smooth movement, rather than a series of teleports as you would get by using SetTransform directly.
Because the position is tied to the framerate the body should not wander from its position like it can with the gradual error buildup with continuous velocity updates which rely on the position being correct in the previous frame.