I want to clarify the other answers slightly. First of all it is critical to distinguish between velocity and speed: velocity is a vector and speed is just a number. Something can have a constant speed while not having a constant velocity.
Special Relativity is usually taken to say that light travels with constant speed in a vacuum (I am not sure whether this formulation is historically correct). So the question is whether this allows light to travel on curves: yes, it does and here's a demonstration of why.
What we can do is construct a series of devices using suitable mirrors which cause a pulse of light to travel along some polygonal path.
First of all it's obvious that I can make such a device: it doesn't break any of the rules about extended objects in SR (it doesn't need to be rigid or anything like that). Secondly I can make a series of these devices with more and more mirrors so the polygon has more and more sides so the path of the light pulse looks more and more like a continuous curve. And finally, all inertial observers will measure that the speed of the pulse is $c$ along any segment of the polygon.
Well, the limit of such devices as the number of sides goes to infinity is light travelling along a smooth curve, with its speed at any point on that curve, as measured by any inertial observer, being $c$. (This business of taking the limit of a finite number of sides to be not only a polygon with an infinite number of sides but a smooth curve is something mathematicians will twitch at but it's just the same as the thing you do to bootstrap calculus and it's fine.)
So insisting that all inertial observers measure the speed of light to be $c$ does not rule out light travelling on curved paths.
To do that we need a stronger assumption: we need to assume that light travels with constant velocity in a vacuum. For reasons that will become apparent we can reformulate this as saying that light travels along straight lines in a vacuum, and its speed along those lines is $c$. This is fine because the integral curves of constant vectors are straight lines.
And this does rule out light travelling on general curves, because general curves are not straight lines.
So if we make this stronger assumption then, if we observe that light does travel on curvilinear paths we know we have reached some kind of regime in which SR is not valid. And, of course, the brilliant trick to resolve this is to say that, indeed, light does travel along straight lines, but that the spacetime through which it travels is curved by gravity so that 'straight lines' become geodesics.