Just in case somebody has the same problem. The solution is to simply to clear the pixmap and then draw the white background yourself before calling fz_run_page(). E.g. like this:
dev = fz_new_draw_device(ctx, pixmap);
path = fz_new_path(ctx);
fz_moveto(ctx, path, 0, 0);
fz_lineto(ctx, path, 0, height);
fz_lineto(ctx, path, width, height);
fz_lineto(ctx, path, width, 0);
fz_closepath(ctx, path);
fz_fill_path(dev, path, 0, ctm, fz_device_gray, &constant_0, 1.0f);
fz_free_path(ctx, path);
fz_run_page(doc, page, dev, ctm, &cookie);
fz_free_device(dev);
It is important to use the results from fz_bound_page() for "width" and "height" because they contain the real, unrounded dimensions of the page.
If you do not use a transformation matrix, you can also just prefill the pixmap with 0xff.