You should initialise with per-pixel alpha:
surface = pygame.Surface((100, 100), flags=pygame.SRCALPHA)
This does not require an initialised display.
Old answer:
You need it to have per-pixel alpha, which isn't automatic even for 32-bit images:
surface = pygame.Surface((100, 100)).convert_alpha()
And to use convert_alpha you need to have initialised the display:
pygame.display.set_mode((X, Y))