Okay... looks like a math problem. I try to explain what i would do. No guarantees that it will work though.

We have a line in 3d space between vector A and B. Our camera location is given by vector C. V1, V2, V3, V4 are the four vertices that form the quad we will use to render our beam texture to (These four vectors need to be calculated).

Imagine we defined a plane that ran through the line AB and camera position C. The normal vector of this plane would be:

N = Cross_Product( A - B, A - C ).

This normal vector will always be perpendicular to the line when looking through our camera. Like this:

Code:
N
 |         
 |__________________
A         B
Now we want our quad vertices to be like this:

Code:
V1         V3
 |         |
 |__________________| 
A|         |B
 |         |
V2         V4
This is easy:

V1 = A + N
V2 = A - N
V3 = B + N
V4 = B - N

Now you have your four vertices. Just draw a textured quad using these and you'll be all set, unless i'm missing something ofcourse. It might be desirable to Normalize N and multiply it with a certian number to change the line's "thickness", but that's up to you.

Hope this helped.