Chrissy-
You could move it into a template but there's no reason that you can't do this for a given page. What exactly are you doing? Have you looked at the HTML created by your page? If the generated IMG tag is in the second TD of the TABLE it should display correctly. Also, you might simply want to right align the image instead of bothering with a TABLE.
I haven't tried it...but the following code section should work:
$table = "<table>\n";
$table .= "<tr>\n";
$table .= "<td>\n";
$table .= "This is the first column. The random image should be to the right of this text in a separate column.\n";
$table .= "</td>\n";
$table .= "<td>\n";
$table .= RandomImage('/media/pics');
$table .= "</td>\n";
$table .= "</tr>\n";
$table .= "</table>\n";
echo $table;