You could do it with OpBitmap like this:
var bmp:TBitmap;
opb:TCanvasOPBitmap;
begin
bmp:=TBitmap.create;
opb:=TCanvasOPBitmap.create;
opb.width:=16;
opb.height:=16;
opb.Canvas.Brush.color:=clRed;
opb.Canvas.FillRect(Rect(0,0,16,16));
opb.Canvas.Brush.color:=clBlack;
opb.Canvas.FillRect(Rect(1,1,15,15));
opb.TransparentColor:=opb.Pixels[8,8];
AssignOpBitmapToBitmap(opb,bmp);
opb.free;
SpeedButton1.Glyph.Assign(Bmp);
bmp.free;