TikZ uses centimeters as default unit, but rasterizing uses dots per inch. So we either need to do some math or we need to tell TikZ to use inch.
A circle with a radius of 25 cm fits into a square of 50 × 50 cm. If you rasterize this with 2 dots per inch (= dpi = px/in), you get 50 cm × 2 px/in × 0.393701 in/cm = approx. 39 pixels. This is exactly what you got.
Since rasterizing using dpi (which is the default rasterizing unit) means converting inch to pixels, you could just use inch as basic unit in your TikZ picture (for example by drawing a circle with a radius of 25 inch using
\draw(0,0) circle (25in);) and than rasterize this using 1 dpi.
There is just one problem here: in TikZ, borders always expand to both sides of a path, which is why the border of the circle will be clipped halfways. So, you actually need to draw it half an inch smaller and make sure that it won't be clipped.
Thus, the following rasterized using 1 dpi (probably using
convert -density 1 filename.pdf filename.png) should get you what you want (I did not try to rasterize it using your method):
\fill[transparent] (-25in,-25in) rectangle (25in,25in);
\draw[line width=1in] (0,0) circle (24.5in);
Result: a square of 50 × 50 pixels with a circle having a border of 1 pixel.